package com.wss.dao;

import com.wss.domain.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 登陆dao接口
 */
@Repository
public interface LoginDao {

    /**
     * 保存帐户信息 后面的数据变量名应和bean类相同
     * @param username
     * @param password
     * @return
     */
    @Select("Select * from account where (username=#{username} and password=#{password})")
    List<Account> loginSelect(@Param("username") String username, @Param("password") String password);

}
